package cn.kgc.shiro02.commons;

/**
 * @Author: 课工场
 * @Version: v1.0  2023/4/4
 * @Description:  响应状态码以及提示信息的枚举
 */
public enum CodeMsg {

    USER_LOCKED("用户被禁用,请联系管理员！",40005),
    CAPTCHA_ERROR("验证码错误",40004),
    CAPTCHA_EXPIRE("验证码失效",40003),
    PASSWORD_ERROR("密码错误",40001),
    USER_NOT_EXIST("用户不存在",40002),
    USER_HAS_EXIST("用户已存在",40006),
    ROLE_EXIST("角色名或描述已存在",40007),
    ROLE_HAS_USED("角色被占用",40008),
    PERMISSION_HAS_USED("不能删除含有子选项的权限",40009),
    USER_NO_AUTHORIZATION("没有权限，请联系管理员",403),
    SUCCESS("操作成功",0),
    ERROR("操作失败",500);



    private  String msg;
    private Integer code;

    CodeMsg(String msg,Integer code){
        this.code = code;
        this.msg = msg;
    }

    public  String  getMsg(){
        return  this.msg;
    }

    public  Integer  getCode(){
        return  this.code;
    }

}
